<?php
	$aInfo = getOption(array('contact_mail', 'mailer', 'address', 'phone', 'fb_fan_page', 'google_map_key', 'google_recaptcha_public_key', 'google_recaptcha_private_key'));
    $mailer = unserialize($aInfo->mailer->opt_val);
?>
<div class="tab-pane fade" id="systemdetailpane">
    <form class="form-horizontal" role="form" method="post" action="<?php echo page_url('he-thong/cap-nhat'); ?>">
    	<div class="form-group">
    		<label for="shop-title" class="col-md-2 control-label">Email liên hệ</label>
            <div class="col-md-4">
                <input type="text" name="options[contact_mail][value]" class="form-control" id="shop-title" value="<?php echo $aInfo->contact_mail->opt_val; ?>" />
                <input type="hidden" name="options[contact_mail][id]" value="<?php echo $aInfo->contact_mail->id; ?>" />
            </div>
        </div>
        <div class="form-group">
    		<label for="shop-title" class="col-md-2 control-label">Tài khoản email</label>
            <div class="col-md-4">
                <input type="text" name="options[mailer][value][username]" class="form-control" id="shop-title" value="<?php echo $mailer['username']; ?>" />
            </div>
        </div>
        <div class="form-group">
    		<label for="shop-title" class="col-md-2 control-label">Password</label>
            <div class="col-md-4">
                <input name="options[mailer][value][password]" type="text" class="form-control" id="shop-title" value="<?php echo $mailer['password']; ?>" />
            </div>
        </div>
        <div class="form-group">
    		<label for="shop-title" class="col-md-2 control-label">Tên người gửi</label>
            <div class="col-md-4">
                <input name="options[mailer][value][from][name]" type="text" class="form-control" id="shop-title" value="<?php echo $mailer['from']['name']; ?>" />
            </div>
        </div>
        <div class="form-group">
    		<label for="shop-title" class="col-md-2 control-label">Email người gửi</label>
            <div class="col-md-4">
                <input name="options[mailer][value][from][email]" type="text" class="form-control" id="shop-title" value="<?php echo $mailer['from']['email']; ?>" />
                <input type="hidden" name="options[mailer][id]" value="<?php echo $aInfo->mailer->id; ?>" />
            </div>
        </div>
        <div class="form-group">
    		<label for="shop-title" class="col-md-2 control-label">Địa chỉ</label>
            <div class="col-md-4">
                <input name="options[address][value]" type="text" class="form-control" id="shop-title" value="<?php echo $aInfo->address->opt_val; ?>" />
                <input type="hidden" name="options[address][id]" value="<?php echo $aInfo->address->id; ?>" />
            </div>
        </div>
        <div class="form-group">
    		<label for="shop-title" class="col-md-2 control-label">Điện thoại</label>
            <div class="col-md-4">
                <input name="options[phone][value]" type="text" class="form-control" id="shop-title" value="<?php echo $aInfo->phone->opt_val; ?>" />
                <input type="hidden" name="options[phone][id]" value="<?php echo $aInfo->phone->id; ?>" />
            </div>
        </div>
        <div class="form-group">
    		<label for="shop-title" class="col-md-2 control-label">Facebook Fanpage</label>
            <div class="col-md-4">
                <input name="options[fb_fan_page][value]" type="text" class="form-control" id="shop-title" value="<?php echo $aInfo->fb_fan_page->opt_val; ?>" />
                <input type="hidden" name="options[fb_fan_page][id]" value="<?php echo $aInfo->fb_fan_page->id; ?>" />
            </div>
        </div>
        <div class="form-group">
    		<label for="shop-title" class="col-md-2 control-label">Goole Map API key</label>
            <div class="col-md-4">
                <input name="options[google_map_key][value]" type="text" class="form-control" id="shop-title" value="<?php echo $aInfo->google_map_key->opt_val; ?>" />
                <input type="hidden" name="options[google_map_key][id]" value="<?php echo $aInfo->google_map_key->id; ?>" />
            </div>
        </div>
        <div class="form-group">
    		<label for="shop-title" class="col-md-2 control-label">Google recaptcha pulic key</label>
            <div class="col-md-4">
                <input name="options[google_recaptcha_public_key][value]" type="text" class="form-control" id="shop-title" value="<?php echo $aInfo->google_recaptcha_public_key->opt_val; ?>" />
                <input type="hidden" name="options[google_recaptcha_public_key][id]" value="<?php echo $aInfo->google_recaptcha_public_key->id; ?>" />
            </div>
        </div>
        <div class="form-group">
    		<label for="shop-title" class="col-md-2 control-label">Google recaptcha private key</label>
            <div class="col-md-4">
                <input name="options[google_recaptcha_private_key][value]" type="text" class="form-control" id="shop-title" value="<?php echo $aInfo->google_recaptcha_private_key->opt_val; ?>" />
                <input type="hidden" name="options[google_recaptcha_private_key][id]" value="<?php echo $aInfo->google_recaptcha_private_key->id; ?>" />
            </div>
        </div>
        <div class="form-group">
            <div class="col-md-4 col-md-offset-2">
                <button type="button" id="user-shop-update-btn" class="btn btn-success">
                    <i class="glyphicon glyphicon-ok-sign"></i>&nbsp;Lưu&nbsp;
                </button>
            </div>
        </div>
    </form>
</div>